package com.czy.api.constant.netty;

/**
 * @author 13225
 * @date 2025/2/11 21:59
 * 服务器返回客户端消息类型：
 *  连接类：
 *      连接成功
 *      断开成功
 *      强制下线
 *  聊天：
 *      收到用户文本消息
 *      收到用户语音消息
 *      收到用户图片消息
 *      收到用户视频消息
 *      收到用户文件消息
 * <p>
 *      收到群组文本消息
 *      收到群组语音消息
 *      收到群组图片消息
 *      收到群组视频消息
 *      收到群组文件消息
 *      收到撤回的消息
 *  实时通讯：
 *      收到用户语音通话
 *      收到用户视频通话
 *      用户语音通话被接受
 *      用户视频通话被接受
 *      用户语音通话被拒绝
 *      用户视频通话被拒绝
 *      用户语音申请被挂断
 *      用户视频申请被挂断
 * <p>
 *      收到群语音通话
 *      收到群视频通话
 *      群语音通话被接受
 *      群视频通话被接受
 *      群语音通话被拒绝
 *      群视频通话被拒绝
 *      群语音申请被挂断
 *      群视频申请被挂断
 *  服务与客户交流：
 *      服务端发送心跳Pong
 *  好友消息：
 *      被删除
 *      被添加好友
 *  朋友圈通知消息：
 *      被点赞
 *      被评论
 *      被收藏
 */
public class ResponseMessageType {

    public final static class Connect {
        public final static String root = "Connect:";
        public final static String CONNECT_SUCCESS = root + "connectSuccess";
        public final static String DISCONNECT_SUCCESS = root + "disconnectSuccess";
        public final static String FORCE_OFFLINE = root + "forceOffline";
    }

    public final static class Chat {
        public final static String root = "Chat:";
        private static final String fromUser = "fromUser:";
        private static final String fromGroup = "fromGroup:";
        private static final String text = "text";
        private static final String voice = "voice";
        private static final String image = "image";
        private static final String video = "video";
        private static final String file = "file";
        public final static String RECEIVE_USER_TEXT_MESSAGE = root + fromUser + text;
        public final static String RECEIVE_USER_VOICE_MESSAGE = root + fromUser + voice;
        public final static String RECEIVE_USER_IMAGE_MESSAGE = root + fromUser + image;
        public final static String RECEIVE_USER_VIDEO_MESSAGE = root + fromUser + video;
        public final static String RECEIVE_USER_FILE_MESSAGE = root + fromUser + file;
        public final static String RECEIVE_GROUP_TEXT_MESSAGE = root + fromGroup + text;
        public final static String RECEIVE_GROUP_VOICE_MESSAGE = root + fromGroup + voice;
        public final static String RECEIVE_GROUP_IMAGE_MESSAGE = root + fromGroup + image;
        public final static String RECEIVE_GROUP_VIDEO_MESSAGE = root + fromGroup + video;
        public final static String RECEIVE_GROUP_FILE_MESSAGE = root + fromGroup + file;
        public final static String RECALL_MESSAGE = root + "recallMessage";
        // 消息已读
        public final static String MESSAGE_HAVE_BEEN_READ = root + "messageHaveBeenRead";
    }

    public final static class ToServer {
        public final static String root = "ToServer:";
        public final static String PONG = root + "pong";
    }

    public final static class Friend {
        public final static String root = "Friend:";
        public final static String DELETED_FRIEND = root + "deletedFriend";
        public final static String ADDED_FRIEND = root + "addedFriend";
        public static final String HANDLE_ADDED_USER = root + "handleAddedUser";
    }

    public final static class Moment {
        public final static String root = "Moment:";
        // 朋友圈被点赞
        public final static String LIKE_MOMENT = root + "likeMoment";
        // 朋友圈被评论
        public final static String COMMENT_MOMENT = root + "commentMoment";
        // 朋友圈被收藏
        public final static String COLLECT_MOMENT = root + "collectMoment";
    }

    public final static class Call {
        public final static String root = "Call:";
        private static final String user = "user:";
        private static final String group = "group:";
        private static final String voice = "voice";
        private static final String video = "video";
        private static final String received = "received:";
        private static final String accept = "accept:";
        private static final String reject = "reject:";
        private static final String hangup = "hangup:";
        // 收到用户语音通话
        public final static String RECEIVE_USER_VOICE_CALL = root + user + received + voice;
        // 收到用户视频通话
        public final static String RECEIVE_USER_VIDEO_CALL = root + user + received + video;
        // 用户语音通话被接受
        public final static String USER_VOICE_CALL_ACCEPT = root + user + accept + voice;
        // 用户视频通话被接受
        public final static String USER_VIDEO_CALL_ACCEPT = root + user + accept + video;
        // 用户语音通话被拒绝
        public final static String USER_VOICE_CALL_REJECT = root + user + reject + voice;
        // 用户视频通话被拒绝
        public final static String USER_VIDEO_CALL_REJECT = root + user + reject + video;
        // 用户语音通话被挂断
        public final static String USER_VOICE_CALL_HANGUP = root + user + hangup + voice;
        // 用户视频通话被挂断
        public final static String USER_VIDEO_CALL_HANGUP = root + user + hangup + video;
        // 收到群语音通话
        public final static String RECEIVE_GROUP_VOICE_CALL = root + group + received + voice;
        // 收到群视频通话
        public final static String RECEIVE_GROUP_VIDEO_CALL = root + group + received + video;
        // 群语音通话被接受
        public final static String GROUP_VOICE_CALL_ACCEPT = root + group + accept + voice;
        // 群视频通话被接受
        public final static String GROUP_VIDEO_CALL_ACCEPT = root + group + accept + video;
        // 群语音通话被拒绝
        public final static String GROUP_VOICE_CALL_REJECT = root + group + reject + voice;
        // 群视频通话被拒绝
        public final static String GROUP_VIDEO_CALL_REJECT = root + group + reject + video;
        // 群语音通话被挂断
        public final static String GROUP_VOICE_CALL_HANGUP = root + group + hangup + voice;
        // 群视频通话被挂断
        public final static String GROUP_VIDEO_CALL_HANGUP = root + group + hangup + video;
    }

    // 等待
    public final static String WAITING = "waiting";
    // 成功
    public final static String SUCCESS = "success";
    // 失败
    public final static String FAILURE = "failure";
}
